Geo-enrichment of data based on shapes

ABSTRACT

Some embodiments provide a non-transitory machine-readable medium that stores a program. The program receives a request to geo-enrich data comprising a set of location data. The program further accesses shape data comprising a plurality of shapes associated with a plurality of geographical regions. The program also associates, for each location data in the set of location data, a shape in the plurality of shape with the location data.

BACKGROUND

Many computing systems and computing devices generate and store anincreasing amount of data. Much of such data may include data thatdescribes a location (e.g., an address, a city, a state, a country, apostal zip code, etc.). Some computing systems may perform geocodingoperations on such data to determine a location on the surface of theEarth associated with the described location. Geocoded data may beuseful in some aspects and/or application. For example, the geocodeddata may be used for mapping purposes, business intelligence, spatialanalysis, etc.

SUMMARY

In some embodiments, a non-transitory machine-readable medium stores aprogram. The program receives a request to geo-enrich data comprising aset of location data. The program further accesses shape data comprisinga plurality of shapes associated with a plurality of geographicalregions. The program also associates, for each location data in the setof location data, a shape in the plurality of shape with the locationdata.

In some embodiments, the program may further generate a spatial datatable comprising the set of location data and the shapes associated withthe set of location data. The set of location data may include a firstlocation attribute and a second location attribute. The associating mayinclude associating, for each location data in the set of location data,a shape in the plurality of shapes with the first attribute of thelocation data. The program may further associate, for each location datain the set of location data, a shape in the plurality of shapes with thesecond location attribute of the location data. The program may furthergenerate a first view that includes the first location attribute of theset of location data and the shapes associated with the first locationattribute of the set of location data. The program may also generate asecond view that includes the second location attribute of the set oflocation data and the shapes associated with the second locationattribute of the set of location data.

In some embodiments, the shape data may further include a plurality ofreference points associated with the plurality of shapes. The programmay further determine, for each shape in the plurality of shapes, thereference point associated with the shape by calculating a centroid ofthe shape; using the centroid of the shape as the reference pointassociated with the shape upon determining that the centroid iscontained in the shape; and using a point within the shape as thereference point associated with the shape upon determining that thecentroid is not contained in the shape. Determining, for each shape inthe plurality of shapes, the reference point associated with the shapemay be by further, upon determining that the shape comprises a pluralityof polygons, identifying a polygon in the plurality of polygons having alargest area. Calculating the centroid of the shape may includecalculating the centroid of the polygon. Using the centroid of the shapeas the reference point associated with the shape may include using thecentroid of the shape as the reference point associated with the shapeupon determining that the centroid is contained in the polygon. Usingthe point within the shape as the reference point associated with theshape may include using the point within the shape as the referencepoint associated with the shape upon determining that the centroid isnot contained in the polygon.

In some embodiments, a method receives a request to geo-enrich datacomprising a set of location data. The method further accesses shapedata comprising a plurality of shapes associated with a plurality ofgeographical regions. The method also associates, for each location datain the set of location data, a shape in the plurality of shape with thelocation data.

In some embodiments, the method may further generate a spatial datatable comprising the set of location data and the shapes associated withthe set of location data. The set of location data may include a firstlocation attribute and a second location attribute. The associating mayinclude associating, for each location data in the set of location data,a shape in the plurality of shapes with the first attribute of thelocation data. The method may further associate, for each location datain the set of location data, a shape in the plurality of shapes with thesecond location attribute of the location data. The method may furthergenerate a first view that includes the first location attribute of theset of location data and the shapes associated with the first locationattribute of the set of location data. The method may also generate asecond view that includes the second location attribute of the set oflocation data and the shapes associated with the second locationattribute of the set of location data.

In some embodiments, the shape data may further include a plurality ofreference points associated with the plurality of shapes. The method mayfurther determine, for each shape in the plurality of shapes, thereference point associated with the shape by calculating a centroid ofthe shape; using the centroid of the shape as the reference pointassociated with the shape upon determining that the centroid iscontained in the shape; and using a point within the shape as thereference point associated with the shape upon determining that thecentroid is not contained in the shape. Determining, for each shape inthe plurality of shapes, the reference point associated with the shapemay be by further, upon determining that the shape comprises a pluralityof polygons, identifying a polygon in the plurality of polygons having alargest area. Calculating the centroid of the shape may includecalculating the centroid of the polygon. Using the centroid of the shapeas the reference point associated with the shape may include using thecentroid of the shape as the reference point associated with the shapeupon determining that the centroid is contained in the polygon. Usingthe point within the shape as the reference point associated with theshape may include using the point within the shape as the referencepoint associated with the shape upon determining that the centroid isnot contained in the polygon.

In some embodiments, a system includes a set of processing units and anon-transitory computer-readable medium storing instructions. Theinstructions cause at least one processing unit to receive a request togeo-enrich data comprising a set of location data. The instructionsfurther cause the at least one processing unit to access shape datacomprising a plurality of shapes associated with a plurality ofgeographical regions. The instructions also cause the at least oneprocessing unit to associate, for each location data in the set oflocation data, a shape in the plurality of shape with the location data.

In some embodiments, the instructions may further cause the at least oneprocessing unit to generate a spatial data table comprising the set oflocation data and the shapes associated with the set of location data.The set of location data may include a first location attribute and asecond location attribute. The associating may include associating, foreach location data in the set of location data, a shape in the pluralityof shapes with the first attribute of the location data. Theinstructions may further cause the at least one processing unit toassociate, for each location data in the set of location data, a shapein the plurality of shapes with the second location attribute of thelocation data. The instructions may further cause the at least oneprocessing unit to generate a first view that includes the firstlocation attribute of the set of location data and the shapes associatedwith the first location attribute of the set of location data. Theinstructions may also cause the at least one processing unit to generatea second view that includes the second location attribute of the set oflocation data and the shapes associated with the second locationattribute of the set of location data.

In some embodiments, the shape data may further include a plurality ofreference points associated with the plurality of shapes. Theinstructions further cause the at least one processing unit todetermine, for each shape in the plurality of shapes, the referencepoint associated with the shape by calculating a centroid of the shape;using the centroid of the shape as the reference point associated withthe shape upon determining that the centroid is contained in the shape;and using a point within the shape as the reference point associatedwith the shape upon determining that the centroid is not contained inthe shape. Determining, for each shape in the plurality of shapes, thereference point associated with the shape may be by further, upondetermining that the shape comprises a plurality of polygons,identifying a polygon in the plurality of polygons having a largestarea. Calculating the centroid of the shape may include calculating thecentroid of the polygon. Using the centroid of the shape as thereference point associated with the shape may include using the centroidof the shape as the reference point associated with the shape upondetermining that the centroid is contained in the polygon. Using thepoint within the shape as the reference point associated with the shapemay include using the point within the shape as the reference pointassociated with the shape upon determining that the centroid is notcontained in the polygon.

The following detailed description and accompanying drawings provide abetter understanding of the nature and advantages of the presentinvention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a system according to some embodiments.

FIG. 2 illustrates example shape data according to some embodiments.

FIG. 3 illustrates example data that includes area-based location datawith one attribute according to some embodiments.

FIG. 4 illustrates geo-enrichment of the data illustrated in FIG. 3based on shapes according to some embodiments.

FIG. 5 illustrates example data that includes area-based location datawith two adjacent attributes according to some embodiments.

FIG. 6 illustrates geo-enrichment of the data illustrated in FIG. 5based on shapes according to some embodiments.

FIG. 7 illustrates example data that includes area-based location datawith two non-adjacent attributes according to some embodiments.

FIG. 8 illustrates geo-enrichment of the data illustrated in FIG. 7based on shapes according to some embodiments.

FIG. 9 illustrates a process for geo-enriching data based on shapesaccording to some embodiments.

FIG. 10 illustrates an example map visualization that includesgeo-enriched data according to some embodiments.

FIG. 11 illustrates an example chart visualization according to someembodiments.

FIG. 12 illustrates an example map filter according to some embodiments.

FIG. 13 illustrates an example location filter according to someembodiments.

FIG. 14 illustrates the chart visualization illustrated in FIG. 11 afterthe map filter illustrated in FIG. 12 is applied according to someembodiments.

FIG. 15 illustrates the chart visualization illustrated in FIG. 11 afterthe location filter illustrated in FIG. 13 is applied according to someembodiments.

FIG. 16 illustrates a process for retrieving geo-enriching data thatincludes shapes according to some embodiments.

FIG. 17 illustrates an exemplary computer system for implementingvarious embodiments described above.

FIG. 18 illustrates an exemplary computing device for implementingvarious embodiments described above.

FIG. 19 illustrates an exemplary system for implementing variousembodiments described above.

DETAILED DESCRIPTION

In the following description, for purposes of explanation, numerousexamples and specific details are set forth in order to provide athorough understanding of the present invention. It will be evident,however, to one skilled in the art that the present invention as definedby the claims may include some or all of the features in these examplesalone or in combination with other features described below, and mayfurther include modifications and equivalents of the features andconcepts described herein.

Described herein are techniques for geo-enriching data based on shapes.In some embodiments, a client device may send a geo-enriching system arequest to geo-enrich data that includes area-based location data. Thegeo-enriching system manages shape data associated with geographicalregions, such as countries, states, counties, cities, etc. In someembodiments, the geo-enriching system geo-enriches the location data bydetermining the shapes in the shape data associated with the locationdata and then generating a spatial data table that includes the locationdata and references to the shapes associated with the location data.When the geo-enriching system receives from the client device a queryfor geo-enriched data, the geo-enriching system uses the references tothe shapes to return the shapes along with the geo-enriched dataspecified in the query.

In some embodiments, geo-enriching data is associating non-location datawith spatial data. For instance, data that includes non-location andlocation data associated with the non-location data may be geo-enrichedby geocoding the location data. In some embodiments, geocoding locationdata is converting the location data to spatial data. In someembodiments, location data is data that describes a location, area,region, or combination thereof (e.g., a location, area, region, orcombination thereof on Earth). Examples of location data may includeaddress data, city data, state data, country data, postal zip code data,latitude and longitude data, etc., or a combination of any number ofdifferent types of location data (e.g., address data and city data, citydata and state data, address data, etc.). In some embodiments, locationdata is textual data.

Spatial data may be data that defines the shape, size, position, and/ororientation of a geometry (e.g., a point, a line, an area, a region, orany combination thereof) in a defined space (e.g., the surface of theEarth). In some embodiments, a defined space in which geometries aredefined is referred to as a spatial reference system (SRS). A particulardefined space may be associated with a unique identifier referred to asa spatial reference identifier (SRID). Spatial data may be representedusing a particular spatial data type (e.g., a point represented as anST_point, a line represented as an ST curve or STpolyline, an arearepresented as an ST_polygon, ST_multipolygon, etc.). Spatial operationsmay be performed on spatial data such as calculating the intersection ofspatial data (e.g., intersection of two polygons), determining whetherspatial data (e.g., a point, a line, a polygon, or any combinationthereof) is contained within another spatial data (e.g., a polygon),determining whether spatial data (e.g., a point, a line, a polygon, orany combination thereof) is within a specified distance of anotherspatial data (e.g., a polygon), determining whether spatial data (e.g.,a point, a line, a polygon, or any combination thereof) is within aspecified distance of another spatial data (e.g., a polygon), etc.

In some embodiments, a spatial visualization is a visualization thatillustrates relationships among elements in a defined space. An exampleof a spatial visualization is a map visualization. In some embodiments,a non-spatial visualization is a visualization that does not depictrelationships among elements in a defined space. Examples of non-spatialvisualizations include charts, graphs, tables, etc.

FIG. 1 illustrates a system 100 according to some embodiments. As shown,system 100 includes client device 105, geo-enriching system 125,geo-enriched data storage 145, and shapes storage 150. Geo-enriched datastorage 145 is configured to store data that has been geo-enriched bygeo-enriching system 125. Shapes storage 150 is configured to storedefinitions of shapes. Storages 145 and 150 may each be a relationaldatabase or a non-relational database managed by a database managementsystem (DBMS) application (not shown) that operates on geo-enrichingsystem 125. In some embodiments, storages 145 and 150 are implemented ina single physical storage while, in other embodiments, storages 145 and150 may be implemented across several physical storages. While FIG. 1shows storages 145 and 150 as external to geo-enriching system 125, oneof ordinary skill in the art will appreciated that storages 145 and/or150 may be included in geo-enriching system 125 in some embodiments.

As shown in FIG. 1, geo-enriching system 125 includes geo-enrichmentmanager 130, geocoder 135, and query processor 140. Geo-enrichmentmanager 130 is responsible for handling requests from client device 105to geo-enrich data. In some embodiments, geo-enrichment manager 130 mayreceive from client device 105 a request to geo-enrich data and the datato geo-enrich. In other embodiments, geo-enrichment manager 130 mayreceive from client device 105 a request to geo-enrich data and a datasource that includes data to geo-enrich. In some such other embodiments,geo-enrichment manager 130 accesses the data source and retrieves thedata to geo-enrich from the data source. In some embodiments,geo-enrichment manager 130 may receive from client device 105 data to begeo-enriched and a data source that includes data to geo-enrich alongwith a request to geo-enrich the data and the data in the data source.

As mentioned above, in some embodiments, the data to be geo-enrichedincludes non-location data and location data. In some such embodiments,the request to geo-enrich data may specify that the type of locationdata is area-based location data (e.g., country data, state data, countydata, city data, etc.), etc.). For requests received with a data source,geo-enrichment manager 130 retrieves the data from the data source andthen sends it to geocoder 135 to geo-enrich the data. For requestsreceived with the data itself, geo-enrichment manager 130 sends the datato geocoder 135 to geo-enrich the data. When geo-enrichment manager 130receives the geo-enriched data from geocoder 135, geo-enrichment manager130 stores the geo-enriched data in geo-enriched data storage 145.

Geo-enrichment manager 130 can also handle queries from client device105 for geo-enriched data. When geo-enrichment manager 130 receives sucha query from client device, geo-enrichment manager 130 sends the queryto query processor 140 for processing. In return, geo-enrichment manager130 receives results for the query from query processor 140.Geo-enrichment manager 130 then sends the results for the query toclient device 105.

Geocoder 135 is configured to geo-enrich location data. Geocoder 135 mayreceive from geo-enrichment manager 130 data that includes location dataand a request to geo-enrich the location data. As mentioned above, therequest to geo-enrich data may specify that the type of location data isarea-based location data in some embodiments. In some embodimentsgeocoder 135 geo-enriches location data based on shape data associatedwith geographical regions stored in shapes storage 150. FIG. 2illustrates example shape data according to some embodiments. As shown,FIG. 2 illustrates a table 200 that includes an Area ID attribute, anArea Name attribute, a Parent Area ID attribute, a Level attribute, aShape attribute, and a Reference Point attribute. The Area ID attributeis for storing an identifier for identifying a data record in table 200.The Area Name attribute is for storing a name of a geographical regionwith which a shape is associated. In some embodiments, shape data may beorganized in one or more hierarchies that include a defined number oflevels. In some such embodiments, such a hierarchy may include two ormore of the following levels from top to bottom: country, region,subregion 1, subregion 2, and subregion 3. As such, the Parent Area IDattribute is for storing an identifier of a parent shape of the shapebased on the one or more hierarchies. The shape data in table 200 isbased on a hierarchy that includes the following levels from top tobottom: country, state, county, and city. The Level attribute is forstoring a level in the hierarchy with which the shape is associated. TheShape attribute is for storing spatial data (e.g., an ST_polygon, anST_multipolygon, etc.) that defines the shape associated with thegeographical region. The Reference Point attribute is for storing aspatial data (e.g., an ST_point) that defines a point in the shapeassociated with the geographical region.

In some embodiments, geo-enrichment manager 130 may determine a point ina shape associated with a geographical region for the Reference Pointattribute. For instance, geo-enrichment manager 130 can determinewhether the spatial data defining the shape associated with thegeographical region is a polygon or a multipolygon (e.g., a set ofpolygons). If the shape is a polygon, geo-enrichment manager 130determines a centroid of the polygon and then determines whether thecentroid is within the polygon. If so, geo-enrichment manager 130determines the centroid as the point in the shape for the ReferencePoint attribute. Otherwise, geo-enrichment manager 130 selects a randompoint in the polygon as the point in the shape for the Reference Pointattribute. If the shape is a multipolygon, geo-enrichment manager 130selects the polygon in the multipolygon having the largest area. Next,geo-enrichment manager 130 determines a centroid of the selected polygonand then determines whether the centroid is within the selected polygon.If so, geo-enrichment manager 130 determines the centroid of theselected polygon as the point in the shape for the Reference Pointattribute. Otherwise, geo-enrichment manager 130 selects a random pointin the selected polygon as the point in the shape for the ReferencePoint attribute.

Returning to FIG. 1, as mentioned above, geocoder 135 geo-enricheslocation data based on shape data associated with geographical regionsstored in shapes storage 150. When geocoder 135 receives data thatincludes location data from geo-enrichment manager 130, geocoder 135determines the number of location data attributes to geo-enrich. In someembodiments, the request to geo-enrich data may specify the level in thehierarchy associated with each location data attribute. If thedetermined number of location data attributes is one, geocoder 135determines the level of the location data attribute and then queries forthe shape data stored in shapes storage 150 for shapes associated withthe location data in a manner described by the following example. Oncegeocoder 135 geo-enriches the location data, geocoder sends thegeo-enriched location data to geo-enrichment manager 130.

An example geo-enrichment operation for location data with one attributewill now be described by reference to FIGS. 3 and 4. FIG. 3 illustratesexample data 300 that includes area-based location data with oneattribute according to some embodiments. As shown data 300 includes anID attribute for storing an identifier for identifying a data record indata 300 and a My State attribute for storing a name of a geographicalstate region. In addition, data 300 includes five data records: a firstdata record that specifies a state of Arizona, a second data record thatspecifies a state of California, a third data record that specifies astate of Florida, a fourth data record that specifies a state of Nevada,and a fifth data record that specifies a state of Oregon. In thisexample the request to geo-enrich data specifies the level in thehierarchy associated with the MyState location data attribute is two,which corresponds to the state level in the hierarchy used for the shapedata in table 200.

FIG. 4 illustrates geo-enrichment of the data illustrated in FIG. 3based on shapes according to some embodiments. As shown, FIG. 4illustrates table 400 and view 405. View 405 may be part of a datamodel. In some embodiments, a data model is defined as one or more viewsand one or more tables associated with the one or more views. A view canbe a filter associated with one or more tables that provides access toone or more attributes (e.g., columns) of the one or more tables.Alternatively or in addition, a view may provide access to datacalculated based on and/or derived from one or more attributes of theone or more tables. In some instances, a view can be a filter associatedwith one or more views and/or tables that provides access to one or moreattributes of the one or more views and/or tables.

As illustrated, Table 400 includes the ID attribute and the MyStateattribute shown in data 300. Table 400 also includes a State attributefor storing an area ID of a shape associated with a geographical stateregion and a State Reference Point attribute for storing a point in theshape associated with the shape. View 405 is a filter associated withtable 400 that provides access to the My State, the State, and the StateReference Point attributes in table 400. In this example, geocoder 135geo-enriches a data record of data 300 by querying for the Area ID andReference Point from table 200 where the value of the Area Nameattribute in table 200 and the value of the MyState attribute of thedata record are the same and where the value of the Level attribute intable 200 is two.

Returning to FIG. 1, if geocoder 135 determines that the number oflocation data attributes is more than one, geocoder 135 determineswhether the levels of the location data attributes are adjacent to eachother. If so, then geocoder 135 queries the shape data stored in shapesstorage 150 for shapes associated with the location data in a mannerdescribed by the following example. Once geocoder 135 geo-enriches thelocation data, geocoder sends the geo-enriched location data togeo-enrichment manager 130.

An example geo-enrichment operation for location data with two adjacentattributes will now be described by reference to FIGS. 5 and 6. FIG. 5illustrates example data 500 that includes area-based location data withtwo adjacent attributes according to some embodiments. As shown data 500includes an ID attribute for storing an identifier for identifying adata record in data 500, a My State attribute for storing a name of ageographical state region, and a MyCounty attribute for storing a nameof a county in the geographical state region. Additionally, data 500includes six data records: a first data record that specifies a state ofCalifornia and a county of Los Angeles, a second data record thatspecifies a state of California and a county of Orange, a third datarecord that specifies a state of California and a county of Santa Clara,a fourth data record that specifies a state of Florida and a county ofCollier, a fifth data record that specifies a state of Florida and acounty of Orange, and a sixth data record that specifies a state ofFlorida and a county of Palm Beach. In this example the request togeo-enrich data specifies the levels in the hierarchy associated withthe MyState location data attribute and the MyCounty location dataattribute are two and three, respectively, which correspond to theadjacent state and county levels in the hierarchy used for the shapedata in table 200.

FIG. 6 illustrates geo-enrichment of the data illustrated in FIG. 5based on shapes according to some embodiments. As shown, FIG. 6illustrates table 600, view 605, and view 610. Views 605 and 610 may bepart of a data model. As illustrated, Table 600 includes the IDattribute, the MyState attribute, and the MyCounty attribute shown indata 500. Table 600 also includes a State attribute for storing an areaID of a shape associated with a geographical state region, a StateReference Point attribute for storing a point in the shape associatedwith the geographical state region, a County attribute for storing anarea ID of a shape associated with a geographical county region, and aCounty Reference Point attribute for storing a point in the shapeassociated with the geographical county region. View 605 is a filterassociated with table 600 that provides access to the My State, theState, and the State Reference Point attributes in table 600. View 610is a filter associated with table 600 that provides access to theMyCounty, the County, and the County Reference Point attributes in table600.

In this example, geocoder 135 geo-enriches a data record of data 500 byperforming a first query for the Area ID, the Parent Area ID, and theReference Point from table 200 where the value of the Area Nameattribute in table 200 and the value of the MyCounty attribute of thedata record are the same or similar and where the value of the Levelattribute in table 200 is three. Then, geocoder 135 performs a secondquery for the Area ID, the Parent Area ID, and the Reference Point fromtable 200 where the value of the Area Name attribute in table 200 andthe value of the My State attribute of the data record are the same orsimilar, where the value of the Area ID attribute in table 200 and thevalue of the Parent ID from a record in the results of the first queryare the same, and where the value of the Level attribute in table 200 istwo. If the second query returns results that are not empty or null,geocoder 135 populates the County attribute and the County ReferencePoint attribute with the Area ID and Reference point from the firstquery and populates the State attribute and the State Reference Pointattribute with the Area ID and Reference point from the second query.Otherwise, geocoder 135 continues to query table 200 in a similar manneras the second query except geocoder 135 iterates to the next record inresults of the first query and uses the value of the Parent ID from therecord. In some embodiments, geocoder 135 implements the operationsdescribed as a single query on table 200.

Returning to FIG. 1, if geocoder 135 determines that the number oflocation data attributes is more than one and that the levels of thelocation data attributes are not adjacent to each other, geocoder 135queries the shape data stored in shapes storage 150 for shapesassociated with the location data in a manner described by the followingexample. Once geocoder 135 geo-enriches the location data, geocodersends the geo-enriched location data to geo-enrichment manager 130.

An example geo-enrichment operation for location data with twonon-adjacent attributes will now be described by reference to FIGS. 7and 8. FIG. 7 illustrates example data 700 that includes area-basedlocation data with two non-adjacent attributes according to someembodiments. As shown data 700 includes an ID attribute for storing anidentifier for identifying a data record in data 500, a MyCountryattribute for storing a name of a geographical country region, and aMyCounty attribute for storing a name of a county in the geographicalstate region. Data 500 also includes four data records: a first datarecord that specifies a country of USA and a county of Collier, a seconddata record that specifies a country of USA and a county of Orange, athird data record that specifies a country of USA and a county of PalmBeach, and a fourth data record that specifies a country of USA and acounty of Santa Clara. In this example the request to geo-enrich dataspecifies the levels in the hierarchy associated with the MyCountrylocation data attribute and the MyCounty location data attribute are oneand three, respectively, which correspond to the non-adjacent countryand county levels in the hierarchy used for the shape data in table 200.

FIG. 8 illustrates geo-enrichment of the data illustrated in FIG. 7based on shapes according to some embodiments. As shown, FIG. 8illustrates table 800, view 805, and view 810. Views 805 and 810 may bepart of a data model. As illustrated, Table 800 includes the IDattribute, the MyCountry attribute, and the MyCounty attribute shown indata 700. In addition, table 800 includes a Country attribute forstoring an area ID of a shape associated with a geographical countryregion, a Country Reference Point attribute for storing a point in theshape associated with the geographical country region, a Countyattribute for storing an area ID of a shape associated with ageographical county region, and a County Reference Point attribute forstoring a point in the shape associated with the geographical countyregion. View 805 is a filter associated with table 800 that providesaccess to the MyCountry, the Country, and the Country Reference Pointattributes in table 800. View 810 is a filter associated with table 800that provides access to the MyCounty, the County, and the CountyReference Point attributes in table 800.

For this example, geocoder 135 geo-enriches a data record of data 700 byperforming a first query for the Area ID, the Parent Area ID, and theReference Point from table 200 where the value of the Area Nameattribute in table 200 and the value of the MyCounty attribute of thedata record are the same or similar and where the value of the Levelattribute in table 200 is three. Then, geocoder 135 performs a secondquery for the Area ID and the Parent Area ID from table 200 where thevalue of the Area ID attribute in table 200 and the value of the ParentID from a record in the results of the first query are the same, andwhere the value of the Level attribute in table 200 is two. Next,geocoder 135 performs a third query for the Area ID, the Parent Area ID,and the Reference Point from table 200 where the value of the Area Nameattribute in table 200 and the value of the My State attribute of thedata record are the same or similar, where the value of the Area IDattribute in table 200 and the value of the Parent ID from a record inthe results of the second query are the same, and where the value of theLevel attribute in table 200 is one. If the third query returns resultsthat are not empty or null, geocoder 135 populates the County attributeand the County Reference Point attribute with the Area ID and Referencepoint from the first query and populates the Country attribute and theCountry Reference Point attribute with the Area ID and Reference pointfrom the third query. Otherwise, geocoder 135 continues to query table200 in a similar manner as the second and third queries except geocoder135 iterates to the next record in results of the first query and usesthe value of the Parent ID from the record. In some embodiments,geocoder 135 implements the operations described as a single query ontable 200.

Query processor 140 processes queries received from geo-enrichmentmanager 130. For example, when query processor 140 receives a query(e.g., a structured query language (SQL) query) for geo-enriched data,query processor 140 accesses geo-enriched data storage 145 and shapesstorage 150. Then query processor 140 identifies geo-enriched dataspecified in the query and shapes associated with the geo-enriched data.Referring to FIGS. 2 and 4 as an example, query processor may accessview 405 in geo-enriched data storage 145 to identify data recordsspecified in the query, access table 200 in shapes storage 150, and thenperform a join operation on the State attribute of the identifiedgeo-enriched data and the Area ID attribute of table 200. Queryprocessor 140 then generates a set of result for the query based on theidentified data. Query processor 140 sends the set of results togeo-enrichment manager 130.

In some embodiments, query processor 140 can be configured to performspatial operations on data that includes spatial data (e.g.,geo-enriched data). For example, query processor 140 may receive fromgeo-enrichment manager 130 a shape associated with a geographicalregion, geo-enriched data, and a query for a subset of the geo-enricheddata associated with the shape. In some embodiments, spatial queryprocessor 140 determines the subset of the geo-enriched data associatedwith a shape by performing a spatial join operation between the geometryof the shape and the spatial data of the geo-enriched data. A spatialjoin operation compares, in some embodiments, a first set of spatialdata with a second set of spatial data and identifies spatial data inthe second set of spatial data that satisfy a type of spatialrelationship with spatial data in the first set of spatial data. Exampletypes of spatial relationships include a first spatial data contains asecond spatial data, a first spatial data intersects a second spatialdata, a first spatial data covers a second spatial data, a first spatialdata is within a specified distance of a second spatial data, etc. Forexample, a distance spatial join operation may compare a first set ofspatial data with a second set of spatial data and identify spatial datain the second set of spatial data that is within a specified distance ofthe first set of spatial data. If the first set of spatial data includesa polygon, the second set of spatial data includes a set of points(e.g., reference points of shapes), and the distance spatial operationspecifies a distance of less than or equal to zero, then such a distancespatial join operation returns points in the set of points that are onor within the polygon. Once spatial query processor 140 performs aspatial join operation between the shape and the geo-enriched data todetermine the subset of the geo-enriched data, spatial query processor140 sends geo-enrichment manager 130 the determined subset ofgeo-enriched data.

FIG. 9 illustrates a process 900 for geo-enriching data based on shapesaccording to some embodiments. In some embodiments, geocoder 135performs process 900. Process 900 starts by receiving, at 910, a requestto geo-enrich data comprising a set of location data. Referring to FIGS.1 and 3 as an example, geocoder 135 receives data 300 fromgeo-enrichment manager 130. Next, process 900 accesses, at 920, shapedata comprising a plurality of shapes associated with a plurality ofgeographical regions. Referring to FIGS. 1 and 2 as an example, geocoder135 accesses table 200 stored in shapes storage 150.

Finally, process 900, associates, at 930, for each location data in theset of location data, a shape in the plurality of shapes with thelocation data. Referring to FIGS. 1-4 as an example, geocoder 135geo-enriches a data record of data 300 by querying for the Area ID andReference Point from table 200 where the value of the Area Nameattribute in table 200 and the value of the My State attribute of thedata record are the same and where the value of the Level attribute intable 200 is two.

Returning to FIG. 1, client device 105 is configured to generate anddisplay visualizations on a display of client device 105. In addition,client device 105 is configure to access and communicate withgeo-enriching system 125 (e.g., via a network) in order to obtain datafor the visualizations. As shown, client device 105 includesvisualization manager 110, data manager 115, and query manager 120. Insome embodiments, visualization manager 110, data manager 115, and querymanager 120 may be implemented in an application (e.g., a web browser)operating on client device 105.

Visualization manager 110 is responsible for managing visualizations forclient device 105. For instance, visualization manager 110 may receive(e.g., from a user of client device 105) a request for a visualizationthat includes data (e.g., geo-enriched data) from a data model. Uponreceiving to a request for a visualization that includes data from adata model, visualization manager 110 sends data manager 115 a requestfor data from the data model. In return, visualization manager 110receives from data manager 115 the data from the data model. Then,visualization manager 110 generates the visualization to include datafrom the data model and displays it on the display of client device 105.Visualization manager 110 can receive from data manager 115 updates todata used in visualizations. When visualization manager 110 receives anupdate to data used in a visualization, visualization manager 110generates the visualization to include the updated data and displays iton the display of client device 105.

Visualization manager 110 can generate different types of visualizationsthat include geo-enriched data. For example, visualization manager 110may generate a map visualization that includes geo-enriched data. FIG.10 illustrates an example map visualization 1000 that includesgeo-enriched data according to some embodiments. For this example, mapvisualization 1000 includes the geographical county regions that includestores in the states of California, Nevada, Utah, and Arizona. As shown,the California counties of Santa Clara County, Los Angeles County, andOrange County have stores. The Arizona county of Cochise County hasstores. As another example, visualization manager 110 can generate achart visualization that includes geo-enriched data. FIG. 11 illustratesan example chart visualization 1100 that includes geo-enriched dataaccording to some embodiments. As shown, chart visualization 1100includes the store sales value associated with each of the countiesillustrated in FIG. 10. Specifically, Santa Clara County has a storesales value of 34564, Los Angeles County has a store sales value of67544, Orange County has a store sales value of 27349, and CochiseCounty has a store sales value of 11834.

In some embodiments, the geo-enriched data used in differentvisualizations is data from the same data model. As explained above, adata model may be defined as one or more views and one or more tablesassociated with the one or more views. For instance, the geo-enricheddata used for map visualization 1000 and chart visualization 1100 may befrom the same data model. In some embodiments, a user of client device105 may specify that different visualizations using the geo-enricheddata from the same data model are associated/linked to each other. FIGS.10 and 11 illustrate an example of visualizations that are linked andthat are using geo-enriched data from the same data model.

FIG. 10 shows an example of a spatial visualization that includesgeo-enriched data while FIG. 11 shows an example of a non-spatialvisualization that includes geo-enriched data. In some embodiments,visualization manager 110 generates and displays on a display of clientdevice 105 one or more spatial visualizations (e.g., map visualization1000) as well as and one or more non-spatial visualizations (e.g., chartvisualization 1100). One of ordinary skill in the art will understandthat visualization manager 110 may generate and display any number ofadditional and/or different spatial and/or non-spatial visualizations.

Data manager 115 is configured to manage data from data models used forvisualizations. For example, data manager 115 may receive a request fromvisualization manager 110 for data from a data model. In response, datamanager 115 generates a query for the data from the data model and sendsthe generated query to query manager 120. In return, data manager 115receives the data from the data model and forwards it to visualizationmanager 110.

In some instances, a user of client device 105 may define and request tocreate a spatial filter for a visualization. In some such instances,data manager 115 receives the request to create a spatial filter andcreates a spatial filter according to the definition of the spatialfilter. In some embodiments, a spatial filter definition specifies atype of spatial filter, spatial parameters associated with the type ofspatial filter, a defined space (e.g., an SRID of a defined space) inwhich the spatial filter is defined, and a spatial attribute on whichthe spatial filter is applied. After creating the spatial filter, datamanager 115 generates a query for data from the data model used for thevisualization that includes the spatial filter. Data manager 115 sendsthe query to query manager 120. In return, data manager 115 receivesfrom query manager 120 data from the data model with the spatial filterapplied. Data manager 115 then sends the filtered data to visualizationmanager 110 to update the visualization that includes data from the datamodel.

Types of spatial filters may include a map filter and a location filter.A map filter filters for geo-enriched data based on a defined geometry.The spatial parameters associated with a map filter may include ageometry of a polygon. FIG. 12 illustrates an example map filteraccording to some embodiments. Specifically, FIG. 12 illustrates mapfilter 1200 applied to map visualization 1000 illustrated in FIG. 10. Inthis example, map filter 1200 is defined by a circular-shaped geometricshape. As shown, the geographic county regions that include stores (LosAngeles County and Orange County in this example) within map filter 1200are included in map visualization 200. In some embodiments, a tool (notshown) included in map visualization 1000 is used to define map filter1200. For this example, the query that data manager 115 generatesspecifies an intersection spatial operation between the geometryassociated with map filter 1200 and the geo-enriched data included inmap visualization 1000 illustrated in FIG. 10.

A location filter filters for geo-enriched data based on a definedgeographical element. The spatial parameters associated with a locationfilter may include a geometry of the defined geographical element. FIG.13 illustrates an example location filter 1300 according to someembodiments. For this example, location filter 1300 is the defined stateof Arizona as indicated by a gray shading of the state. As illustrated,the geographic county regions that include stores (Cochise in thisexample) within location filter 1300 are included in map visualization1000. In this example, the query that data manager 115 generatesspecifies a distance spatial operation between the geometry associatedwith location filter 1300 and the reference points (e.g., values for theCounty Reference Point attribute) associated with the geo-enriched dataincluded in map visualization 1000 illustrated in FIG where the distanceis less than or equal to zero.

As described above, different visualizations using geo-enriched datafrom the same data model may be associated/linked to each other. Whendata manager 115 receives a spatial filter for one linked visualization,data manager 115 applies the spatial filter to the data used in the onelinked visualization in the manner described above. Data manager 115then applies the spatial filter to data used in the other linkedvisualization. Data manager 115 sends the filtered data to visualizationmanager 110 to update the other linked visualization. As explainedabove, FIGS. 10 and 11 illustrate an example of visualizations that arelinked and that are using geo-enriched data from the same data model.FIG. 14 illustrates chart visualization 1100 after map filter 1200 isapplied according to some embodiments. As shown, chart visualization1100 includes the store sales value associated with each of the counties(Santa Clara County and Los Angeles County) illustrated in FIG. 12. FIG.15 illustrates chart visualization 1100 after location filter 1300 isapplied according to some embodiments. As shown, chart visualization1100 includes the store sales value associated with the county (CochiseCounty) illustrated in FIG. 13.

Query manager 120 is responsible for handling queries for data fromgeo-enriching system 125. For example, query manager 120 may receivefrom data manager 115 a request for data from a data model. Uponreceiving such a request, query manager 120 sends the query togeo-enriching system 125. In return, query manager 120 receives the datafrom the data model, which query manager 120 then forwards to datamanager 115.

FIG. 16 illustrates a process 1600 for retrieving geo-enriching datathat includes shapes according to some embodiments. In some embodiments,client device 105 perform process 1600. Process 1600 begins byreceiving, at 1610, a request for a map visualization that includesgeo-enriched data comprising a set of shapes. Referring to FIGS. 1 and10 as an example, visualization manager 110 may receive a request formap visualization 1000 illustrated in FIG. 10 and then send the requestto data manager 115.

Next, process 1600 generates, at 1620, a query for the geo-enricheddata. Continuing with the above example, data manager 115 generates thequery for the geo-enriched data from a data model and sends thegenerated query to query manager 120. The query for this example is forshapes of geographical county regions. Process 1600 then sends, at 1630,the query to a geo-enriching system. Continuing with the above example,query manager 120 sends the query to geo-enriching system 125. Next,process 1600 receives, at 1640, the geo-enriched data from thegeo-enriching system. Continuing with the above example, query manager120 receives the geo-enriched data from geo-enriching system 125.Finally, process 1600 generates, at 1650, the map visualization thatincludes the set of shapes. Continuing with the above example, FIG. 10illustrates map visualization 1000 that includes the set of shapes ofgeographical county regions.

FIG. 17 illustrates an exemplary computer system 1700 for implementingvarious embodiments described above. For example, computer system 1700may be used to implement client device 105 and geo-enriching system 125.Computer system 1700 may be a desktop computer, a laptop, a servercomputer, or any other type of computer system or combination thereof.Computer system 1700 can implement many of the operations, methods,and/or processes described above (e.g., process 900 and 1600). As shownin FIG. 17, computer system 1700 includes processing subsystem 1702,which communicates, via bus subsystem 1726, with input/output (I/O)subsystem 1708, storage subsystem 1710 and communication subsystem 1724.

Bus subsystem 1726 is configured to facilitate communication among thevarious components and subsystems of computer system 1700. While bussubsystem 1726 is illustrated in FIG. 17 as a single bus, one ofordinary skill in the art will understand that bus subsystem 1726 may beimplemented as multiple buses. Bus subsystem 1726 may be any of severaltypes of bus structures (e.g., a memory bus or memory controller, aperipheral bus, a local bus, etc.) using any of a variety of busarchitectures. Examples of bus architectures may include an IndustryStandard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus,an Enhanced ISA (EISA) bus, a Video Electronics Standards Association(VESA) local bus, a Peripheral Component Interconnect (PCI) bus, aUniversal Serial Bus (USB), etc.

Processing subsystem 1702, which can be implemented as one or moreintegrated circuits (e.g., a conventional microprocessor ormicrocontroller), controls the operation of computer system 1700.Processing subsystem 1702 may include one or more processors 1704. Eachprocessor 1704 may include one processing unit 1706 (e.g., a single coreprocessor such as processor 1704-1) or several processing units 1706(e.g., a multicore processor such as processor 1704-2). In someembodiments, processors 1704 of processing subsystem 1702 may beimplemented as independent processors while, in other embodiments,processors 1704 of processing subsystem 1702 may be implemented asmultiple processors integrate into a single chip or multiple chips.Still, in some embodiments, processors 1704 of processing subsystem 1702may be implemented as a combination of independent processors andmultiple processors integrated into a single chip or multiple chips.

In some embodiments, processing subsystem 1702 can execute a variety ofprograms or processes in response to program code and can maintainmultiple concurrently executing programs or processes. At any giventime, some or all of the program code to be executed can reside inprocessing subsystem 1702 and/or in storage subsystem 1710. Throughsuitable programming, processing subsystem 1702 can provide variousfunctionalities, such as the functionalities described above byreference to process 900, 1600, etc.

I/O subsystem 1708 may include any number of user interface inputdevices and/or user interface output devices. User interface inputdevices may include a keyboard, pointing devices (e.g., a mouse, atrackball, etc.), a touchpad, a touch screen incorporated into adisplay, a scroll wheel, a click wheel, a dial, a button, a switch, akeypad, audio input devices with voice recognition systems, microphones,image/video capture devices (e.g., webcams, image scanners, barcodereaders, etc.), motion sensing devices, gesture recognition devices, eyegesture (e.g., blinking) recognition devices, biometric input devices,and/or any other types of input devices.

User interface output devices may include visual output devices (e.g., adisplay subsystem, indicator lights, etc.), audio output devices (e.g.,speakers, headphones, etc.), etc. Examples of a display subsystem mayinclude a cathode ray tube (CRT), a flat-panel device (e.g., a liquidcrystal display (LCD), a plasma display, etc.), a projection device, atouch screen, and/or any other types of devices and mechanisms foroutputting information from computer system 1700 to a user or anotherdevice (e.g., a printer).

As illustrated in FIG. 17, storage subsystem 1710 includes system memory1712, computer-readable storage medium 1720, and computer-readablestorage medium reader 1722. System memory 1712 may be configured tostore software in the form of program instructions that are loadable andexecutable by processing subsystem 1702 as well as data generated duringthe execution of program instructions. In some embodiments, systemmemory 1712 may include volatile memory (e.g., random access memory(RAM)) and/or non-volatile memory (e.g., read-only memory (ROM),programmable read-only memory (PROM), erasable programmable read-onlymemory (EPROM), electrically erasable programmable read-only memory(EEPROM), flash memory, etc.). System memory 1712 may include differenttypes of memory, such as static random access memory (SRAM) and/ordynamic random access memory (DRAM). System memory 1712 may include abasic input/output system (BIOS), in some embodiments, that isconfigured to store basic routines to facilitate transferringinformation between elements within computer system 1700 (e.g., duringstart-up). Such a BIOS may be stored in ROM (e.g., a ROM chip), flashmemory, or any other type of memory that may be configured to store theBIOS.

As shown in FIG. 17, system memory 1712 includes application programs1714, program data 1716, and operating system (OS) 1718. OS 1718 may beone of various versions of Microsoft Windows, Apple Mac OS, Apple OS X,Apple macOS, and/or Linux operating systems, a variety ofcommercially-available UNIX or UNIX-like operating systems (includingwithout limitation the variety of GNU/Linux operating systems, theGoogle Chrome® OS, and the like) and/or mobile operating systems such asApple iOS, Windows Phone, Windows Mobile, Android, BlackBerry OS,Blackberry 10, and Palm OS, WebOS operating systems.

Computer-readable storage medium 1720 may be a non-transitorycomputer-readable medium configured to store software (e.g., programs,code modules, data constructs, instructions, etc.). Many of thecomponents (e.g., visualization manager 110, data manager 115, querymanager 120, geo-enrichment manager 130, geocode 135, and queryprocessor 140) and/or processes (e.g., process 900 and 1600) describedabove may be implemented as software that when executed by a processoror processing unit (e.g., a processor or processing unit of processingsubsystem 1702) performs the operations of such components and/orprocesses. Storage subsystem 1710 may also store data used for, orgenerated during, the execution of the software.

Storage subsystem 1710 may also include computer-readable storage mediumreader 1722 that is configured to communicate with computer-readablestorage medium 1720. Together and, optionally, in combination withsystem memory 1712, computer-readable storage medium 1720 maycomprehensively represent remote, local, fixed, and/or removable storagedevices plus storage media for temporarily and/or more permanentlycontaining, storing, transmitting, and retrieving computer-readableinformation.

Computer-readable storage medium 1720 may be any appropriate media knownor used in the art, including storage media such as volatile,non-volatile, removable, non-removable media implemented in any methodor technology for storage and/or transmission of information. Examplesof such storage media includes RAM, ROM, EEPROM, flash memory or othermemory technology, compact disc read-only memory (CD-ROM), digitalversatile disk (DVD), Blu-ray Disc (BD), magnetic cassettes, magnetictape, magnetic disk storage (e.g., hard disk drives), Zip drives,solid-state drives (SSD), flash memory card (e.g., secure digital (SD)cards, CompactFlash cards, etc.), USB flash drives, or any other type ofcomputer-readable storage media or device.

Communication subsystem 1724 serves as an interface for receiving datafrom, and transmitting data to, other devices, computer systems, andnetworks. For example, communication subsystem 1724 may allow computersystem 1700 to connect to one or more devices via a network (e.g., apersonal area network (PAN), a local area network (LAN), a storage areanetwork (SAN), a campus area network (CAN), a metropolitan area network(MAN), a wide area network (WAN), a global area network (GAN), anintranet, the Internet, a network of any number of different types ofnetworks, etc.). Communication subsystem 1724 can include any number ofdifferent communication components. Examples of such components mayinclude radio frequency (RF) transceiver components for accessingwireless voice and/or data networks (e.g., using cellular technologiessuch as 2G, 3G, 4G, 5G, etc., wireless data technologies such as Wi-Fi,Bluetooth, ZigBee, etc., or any combination thereof), global positioningsystem (GPS) receiver components, and/or other components. In someembodiments, communication subsystem 1724 may provide componentsconfigured for wired communication (e.g., Ethernet) in addition to orinstead of components configured for wireless communication.

One of ordinary skill in the art will realize that the architectureshown in FIG. 17 is only an example architecture of computer system1700, and that computer system 1700 may have additional or fewercomponents than shown, or a different configuration of components. Thevarious components shown in FIG. 17 may be implemented in hardware,software, firmware or any combination thereof, including one or moresignal processing and/or application specific integrated circuits.

FIG. 18 illustrates an exemplary computing device 1800 for implementingvarious embodiments described above. For example, computing device 1800may be used to implement client device 105. Computing device 1800 may bea cellphone, a smartphone, a wearable device, an activity tracker ormanager, a tablet, a personal digital assistant (PDA), a media player,or any other type of mobile computing device or combination thereof.Computing device 1800 can implement many of the operations, methods,and/or processes described above (e.g., process 1600). As shown in FIG.18, computing device 1800 includes processing system 1802, input/output(I/O) system 1808, communication system 1818, and storage system 1820.These components may be coupled by one or more communication buses orsignal lines.

Processing system 1802, which can be implemented as one or moreintegrated circuits (e.g., a conventional microprocessor ormicrocontroller), controls the operation of computing device 1800. Asshown, processing system 1802 includes one or more processors 1804 andmemory 1806. Processors 1804 are configured to run or execute varioussoftware and/or sets of instructions stored in memory 1806 to performvarious functions for computing device 1800 and to process data.

Each processor of processors 1804 may include one processing unit (e.g.,a single core processor) or several processing units (e.g., a multicoreprocessor). In some embodiments, processors 1804 of processing system1802 may be implemented as independent processors while, in otherembodiments, processors 1804 of processing system 1802 may beimplemented as multiple processors integrate into a single chip. Still,in some embodiments, processors 1804 of processing system 1802 may beimplemented as a combination of independent processors and multipleprocessors integrated into a single chip.

Memory 1806 may be configured to receive and store software (e.g.,operating system 1822, applications 1824, I/O module 1826, communicationmodule 1828, etc. from storage system 1820) in the form of programinstructions that are loadable and executable by processors 1804 as wellas data generated during the execution of program instructions. In someembodiments, memory 1806 may include volatile memory (e.g., randomaccess memory (RAM)), non-volatile memory (e.g., read-only memory (ROM),programmable read-only memory (PROM), erasable programmable read-onlymemory (EPROM), electrically erasable programmable read-only memory(EEPROM), flash memory, etc.), or a combination thereof.

I/O system 1808 is responsible for receiving input through variouscomponents and providing output through various components. As shown forthis example, I/O system 1808 includes display 1810, one or more sensors1812, speaker 1814, and microphone 1816. Display 1810 is configured tooutput visual information (e.g., a graphical user interface (GUI)generated and/or rendered by processors 1804). In some embodiments,display 1810 is a touch screen that is configured to also receivetouch-based input. Display 1810 may be implemented using liquid crystaldisplay (LCD) technology, light-emitting diode (LED) technology, organicLED (OLED) technology, organic electro luminescence (OEL) technology, orany other type of display technologies. Sensors 1812 may include anynumber of different types of sensors for measuring a physical quantity(e.g., temperature, force, pressure, acceleration, orientation, light,radiation, etc.). Speaker 1814 is configured to output audio informationand microphone 1816 is configured to receive audio input. One ofordinary skill in the art will appreciate that I/O system 1808 mayinclude any number of additional, fewer, and/or different components.For instance, I/O system 1808 may include a keypad or keyboard forreceiving input, a port for transmitting data, receiving data and/orpower, and/or communicating with another device or component, an imagecapture component for capturing photos and/or videos, etc.

Communication system 1818 serves as an interface for receiving datafrom, and transmitting data to, other devices, computer systems, andnetworks. For example, communication system 1818 may allow computingdevice 1800 to connect to one or more devices via a network (e.g., apersonal area network (PAN), a local area network (LAN), a storage areanetwork (SAN), a campus area network (CAN), a metropolitan area network(MAN), a wide area network (WAN), a global area network (GAN), anintranet, the Internet, a network of any number of different types ofnetworks, etc.). Communication system 1818 can include any number ofdifferent communication components. Examples of such components mayinclude radio frequency (RF) transceiver components for accessingwireless voice and/or data networks (e.g., using cellular technologiessuch as 2G, 3G, 4G, 5G, etc., wireless data technologies such as Wi-Fi,Bluetooth, ZigBee, etc., or any combination thereof), global positioningsystem (GPS) receiver components, and/or other components. In someembodiments, communication system 1818 may provide components configuredfor wired communication (e.g., Ethernet) in addition to or instead ofcomponents configured for wireless communication.

Storage system 1820 handles the storage and management of data forcomputing device 1800. Storage system 1820 may be implemented by one ormore non-transitory machine-readable mediums that are configured tostore software (e.g., programs, code modules, data constructs,instructions, etc.) and store data used for, or generated during, theexecution of the software. Many of the components (e.g., visualizationmanager 110, data manager 115, and query manager 120) and/or processes(e.g., process 1600) described above may be implemented as software thatwhen executed by a processor or processing unit (e.g., processors 1804of processing system 1802) performs the operations of such componentsand/or processes.

In this example, storage system 1820 includes operating system 1822, oneor more applications 1824, I/O module 1826, and communication module1828. Operating system 1822 includes various procedures, sets ofinstructions, software components and/or drivers for controlling andmanaging general system tasks (e.g., memory management, storage devicecontrol, power management, etc.) and facilitates communication betweenvarious hardware and software components. Operating system 1822 may beone of various versions of Microsoft Windows, Apple Mac OS, Apple OS X,Apple macOS, and/or Linux operating systems, a variety ofcommercially-available UNIX or UNIX-like operating systems (includingwithout limitation the variety of GNU/Linux operating systems, theGoogle Chrome® OS, and the like) and/or mobile operating systems such asApple iOS, Windows Phone, Windows Mobile, Android, BlackBerry OS,Blackberry 10, and Palm OS, WebOS operating systems.

Applications 1824 can include any number of different applicationsinstalled on computing device 1800. Examples of such applications mayinclude a browser application, an address book application, a contactlist application, an email application, an instant messagingapplication, a word processing application, JAVA-enabled applications,an encryption application, a digital rights management application, avoice recognition application, location determination application, amapping application, a music player application, etc.

I/O module 1826 manages information received via input components (e.g.,display 1810, sensors 1812, and microphone 1816) and information to beoutputted via output components (e.g., display 1810 and speaker 1814).Communication module 1828 facilitates communication with other devicesvia communication system 1818 and includes various software componentsfor handling data received from communication system 1818.

One of ordinary skill in the art will realize that the architectureshown in FIG. 18 is only an example architecture of computing device1800, and that computing device 1800 may have additional or fewercomponents than shown, or a different configuration of components. Thevarious components shown in FIG. 18 may be implemented in hardware,software, firmware or any combination thereof, including one or moresignal processing and/or application specific integrated circuits.

FIG. 19 illustrates an exemplary system 1900 for implementing variousembodiments described above. For example, cloud computing system 1912 ofsystem 1900 may be used to implement geo-enriching system 125 and one ofclient devices 1902-1908 of system 1900 may be used to implement clientdevice 105. As shown, system 1900 includes client devices 1902-1908, oneor more networks 1910, and cloud computing system 1912. Cloud computingsystem 1912 is configured to provide resources and data to clientdevices 1902-1908 via networks 1910. In some embodiments, cloudcomputing system 1900 provides resources to any number of differentusers (e.g., customers, tenants, organizations, etc.). Cloud computingsystem 1912 may be implemented by one or more computer systems (e.g.,servers), virtual machines operating on a computer system, or acombination thereof.

As shown, cloud computing system 1912 includes one or more applications1914, one or more services 1916, and one or more databases 1918. Cloudcomputing system 1900 may provide applications 1914, services 1916, anddatabases 1918 to any number of different customers in a self-service,subscription-based, elastically scalable, reliable, highly available,and secure manner.

In some embodiments, cloud computing system 1900 may be adapted toautomatically provision, manage, and track a customer's subscriptions toservices offered by cloud computing system 1900. Cloud computing system1900 may provide cloud services via different deployment models. Forexample, cloud services may be provided under a public cloud model inwhich cloud computing system 1900 is owned by an organization sellingcloud services and the cloud services are made available to the generalpublic or different industry enterprises. As another example, cloudservices may be provided under a private cloud model in which cloudcomputing system 1900 is operated solely for a single organization andmay provide cloud services for one or more entities within theorganization. The cloud services may also be provided under a communitycloud model in which cloud computing system 1900 and the cloud servicesprovided by cloud computing system 1900 are shared by severalorganizations in a related community. The cloud services may also beprovided under a hybrid cloud model, which is a combination of two ormore of the aforementioned different models.

In some instances, any one of applications 1914, services 1916, anddatabases 1918 made available to client devices 1902-1908 via networks1910 from cloud computing system 1900 is referred to as a “cloudservice.” Typically, servers and systems that make up cloud computingsystem 1900 are different from the on-premises servers and systems of acustomer. For example, cloud computing system 1900 may host anapplication and a user of one of client devices 1902-1908 may order anduse the application via networks 1910.

Applications 1914 may include software applications that are configuredto execute on cloud computing system 1912 (e.g., a computer system or avirtual machine operating on a computer system) and be accessed,controlled, managed, etc. via client devices 1902-1908. In someembodiments, applications 1914 may include server applications and/ormid-tier applications (e.g., HTTP (hypertext transport protocol) serverapplications, FTP (file transfer protocol) server applications, CGI(common gateway interface) server applications, JAVA serverapplications, etc.). Services 1916 are software components, modules,application, etc. that are configured to execute on cloud computingsystem 1912 and provide functionalities to client devices 1902-1908 vianetworks 1910. Services 1916 may be web-based services or on-demandcloud services.

Databases 1918 are configured to store and/or manage data that isaccessed by applications 1914, services 1916, and/or client devices1902-1908. For instance, storages 145 and 150 may be stored in databases1918. Databases 1918 may reside on a non-transitory storage medium localto (and/or resident in) cloud computing system 1912, in a storage-areanetwork (SAN), on a non-transitory storage medium local located remotelyfrom cloud computing system 1912. In some embodiments, databases 1918may include relational databases that are managed by a relationaldatabase management system (RDBMS). Databases 1918 may be acolumn-oriented databases, row-oriented databases, or a combinationthereof. In some embodiments, some or all of databases 1918 arein-memory databases. That is, in some such embodiments, data fordatabases 1918 are stored and managed in memory (e.g., random accessmemory (RAM)).

Client devices 1902-1908 are configured to execute and operate a clientapplication (e.g., a web browser, a proprietary client application,etc.) that communicates with applications 1914, services 1916, and/ordatabases 1918 via networks 1910. This way, client devices 1902-1908 mayaccess the various functionalities provided by applications 1914,services 1916, and databases 1918 while applications 1914, services1916, and databases 1918 are operating (e.g., hosted) on cloud computingsystem 1900. Client devices 1902-1908 may be computer system 1700 orcomputing device 1800, as described above by reference to FIGS. 17 and18, respectively. Although system 1900 is shown with four clientdevices, any number of client devices may be supported.

Networks 1910 may be any type of network configured to facilitate datacommunications among client devices 1902-1908 and cloud computing system1912 using any of a variety of network protocols. Networks 1910 may be apersonal area network (PAN), a local area network (LAN), a storage areanetwork (SAN), a campus area network (CAN), a metropolitan area network(MAN), a wide area network (WAN), a global area network (GAN), anintranet, the Internet, a network of any number of different types ofnetworks, etc.

The above description illustrates various embodiments of the presentinvention along with examples of how aspects of the present inventionmay be implemented. The above examples and embodiments should not bedeemed to be the only embodiments, and are presented to illustrate theflexibility and advantages of the present invention as defined by thefollowing claims. Based on the above disclosure and the followingclaims, other arrangements, embodiments, implementations and equivalentswill be evident to those skilled in the art and may be employed withoutdeparting from the spirit and scope of the invention as defined by theclaims.

What is claimed is:
 1. A non-transitory machine-readable medium storinga program executable by at least one processing unit of a computingdevice, the program comprising sets of instructions for: receiving arequest to geo-enrich data comprising a set of location data; accessingshape data comprising a plurality of shapes associated with a pluralityof geographical regions; and associating, for each location data in theset of location data, a shape in the plurality of shape with thelocation data.
 2. The non-transitory machine-readable medium of claim 1,wherein the program further comprises a set of instructions forgenerating a spatial data table comprising the set of location data andthe shapes associated with the set of location data.
 3. Thenon-transitory machine-readable medium of claim 1, wherein the set oflocation data comprises a first location attribute and a second locationattribute, wherein the associating comprises associating, for eachlocation data in the set of location data, a shape in the plurality ofshapes with the first attribute of the location data, wherein theprogram further comprises a set of instructions for associating, foreach location data in the set of location data, a shape in the pluralityof shapes with the second location attribute of the location data. 4.The non-transitory machine-readable medium of claim 3, wherein theprogram further comprises sets of instructions for: generating a firstview that includes the first location attribute of the set of locationdata and the shapes associated with the first location attribute of theset of location data; and generating a second view that includes thesecond location attribute of the set of location data and the shapesassociated with the second location attribute of the set of locationdata.
 5. The non-transitory machine-readable medium of claim 1, whereinthe shape data further comprises a plurality of reference pointsassociated with the plurality of shapes.
 6. The non-transitorymachine-readable medium of claim 5, wherein the program furthercomprises sets of instructions for: determining, for each shape in theplurality of shapes, the reference point associated with the shape by:calculating a centroid of the shape; using the centroid of the shape asthe reference point associated with the shape upon determining that thecentroid is contained in the shape; and using a point within the shapeas the reference point associated with the shape upon determining thatthe centroid is not contained in the shape.
 7. The non-transitorymachine-readable medium of claim 6, wherein determining, for each shapein the plurality of shapes, the reference point associated with theshape by further, upon determining that the shape comprises a pluralityof polygons, identifying a polygon in the plurality of polygons having alargest area, wherein calculating the centroid of the shape comprisescalculating the centroid of the polygon, wherein using the centroid ofthe shape as the reference point associated with the shape comprisesusing the centroid of the shape as the reference point associated withthe shape upon determining that the centroid is contained in thepolygon, wherein using the point within the shape as the reference pointassociated with the shape comprises using the point within the shape asthe reference point associated with the shape upon determining that thecentroid is not contained in the polygon.
 8. A method comprising:receiving a request to geo-enrich data comprising a set of locationdata; accessing shape data comprising a plurality of shapes associatedwith a plurality of geographical regions; and associating, for eachlocation data in the set of location data, a shape in the plurality ofshape with the location data.
 9. The method of claim 8 furthercomprising generating a spatial data table comprising the set oflocation data and the shapes associated with the set of location data.10. The method of claim 8, wherein the set of location data comprises afirst location attribute and a second location attribute, wherein theassociating comprises associating, for each location data in the set oflocation data, a shape in the plurality of shapes with the firstattribute of the location data, wherein the method further comprisesassociating, for each location data in the set of location data, a shapein the plurality of shapes with the second location attribute of thelocation data.
 11. The method of claim 10 further comprising: generatinga first view that includes the first location attribute of the set oflocation data and the shapes associated with the first locationattribute of the set of location data; and generating a second view thatincludes the second location attribute of the set of location data andthe shapes associated with the second location attribute of the set oflocation data.
 12. The method of claim 8, wherein the shape data furthercomprises a plurality of reference points associated with the pluralityof shapes.
 13. The method of claim 12 further comprising: determining,for each shape in the plurality of shapes, the reference pointassociated with the shape by: calculating a centroid of the shape; usingthe centroid of the shape as the reference point associated with theshape upon determining that the centroid is contained in the shape; andusing a point within the shape as the reference point associated withthe shape upon determining that the centroid is not contained in theshape.
 14. The method of claim 13, wherein determining, for each shapein the plurality of shapes, the reference point associated with theshape by further, upon determining that the shape comprises a pluralityof polygons, identifying a polygon in the plurality of polygons having alargest area, wherein calculating the centroid of the shape comprisescalculating the centroid of the polygon, wherein using the centroid ofthe shape as the reference point associated with the shape comprisesusing the centroid of the shape as the reference point associated withthe shape upon determining that the centroid is contained in thepolygon, wherein using the point within the shape as the reference pointassociated with the shape comprises using the point within the shape asthe reference point associated with the shape upon determining that thecentroid is not contained in the polygon.
 15. A system comprising: a setof processing units; and a non-transitory computer-readable mediumstoring instructions that when executed by at least one processing unitin the set of processing units cause the at least one processing unitto: receive a request to geo-enrich data comprising a set of locationdata; access shape data comprising a plurality of shapes associated witha plurality of geographical regions; and associate, for each locationdata in the set of location data, a shape in the plurality of shape withthe location data.
 16. The system of claim 15, wherein the instructionsfurther cause the at least one processing unit to generate a spatialdata table comprising the set of location data and the shapes associatedwith the set of location data.
 17. The system of claim 15, wherein theset of location data comprises a first location attribute and a secondlocation attribute, wherein the associating comprises associating, foreach location data in the set of location data, a shape in the pluralityof shapes with the first attribute of the location data, wherein theinstructions further cause the at least one processing unit toassociate, for each location data in the set of location data, a shapein the plurality of shapes with the second location attribute of thelocation data.
 18. The system of claim 17, wherein the instructionsfurther cause the at least one processing unit to: generate a first viewthat includes the first location attribute of the set of location dataand the shapes associated with the first location attribute of the setof location data; and generate a second view that includes the secondlocation attribute of the set of location data and the shapes associatedwith the second location attribute of the set of location data.
 19. Thesystem of claim 15, wherein the shape data further comprises a pluralityof reference points associated with the plurality of shapes, wherein theinstructions further cause the at least one processing unit to:determine, for each shape in the plurality of shapes, the referencepoint associated with the shape by: calculating a centroid of the shape;using the centroid of the shape as the reference point associated withthe shape upon determining that the centroid is contained in the shape;and using a point within the shape as the reference point associatedwith the shape upon determining that the centroid is not contained inthe shape.
 20. The system of claim 19, wherein determining, for eachshape in the plurality of shapes, the reference point associated withthe shape by further, upon determining that the shape comprises aplurality of polygons, identifying a polygon in the plurality ofpolygons having a largest area, wherein calculating the centroid of theshape comprises calculating the centroid of the polygon, wherein usingthe centroid of the shape as the reference point associated with theshape comprises using the centroid of the shape as the reference pointassociated with the shape upon determining that the centroid iscontained in the polygon, wherein using the point within the shape asthe reference point associated with the shape comprises using the pointwithin the shape as the reference point associated with the shape upondetermining that the centroid is not contained in the polygon.